static inline double doublemax(double a, double b) {
    return a>b?a:b;
}

typedef struct {
    int isCall;
    int isEuropean;
    int doPrint;
    int nsteps;
    double S0;
    double strikePrice;
    double sigma;
    double r;
    double endTime;
} treePars;

typedef struct {
    double optionValue;
    double hedge;
} treeResults;

void binomtree(treePars *pars, treeResults *results);
void getPars(int argc, char *argv[], treePars *pars);
